import {fetch_get, fetch_post} from '../_utils/request'
import { baseUrl } from '../../config/index'

// 获取文章全部信息
export async function addVisted(data){
  return fetch_get({
    url:baseUrl+"visit/addVisited",
    data:{
      articleItemId:data.id
    }
  })
}

// 添加订阅
export async function addSubscribe(data){
  return fetch_get({
    url:baseUrl+"visit/addSubscribe",
    data:{
      articleId:data.id
    }
  })
}


// 获取文章全部信息
export async function queryArticleAll(data){
  return fetch_get({
    url:baseUrl+"visit/list"
  })
}

// 删除订阅合集
export async function deleteSubscribe(data){
  return fetch_post({
    method:"PUT",
    url:baseUrl+"visit/delete",
    data:[data.id]
  })
}


